Field of the Invention
The invention relates to table management. Specifically, the embodiments of the invention relate to a method and system for reorganizing tables to maintain a hierarchy or order of columns in response to user changes to the grouping of fields within columns.
Background
Tables are utilized in a large number of different applications. The applications include spreadsheet applications such as EXCEL® by Microsoft Corporation of Redmond, Wash., supply chain management applications such as SCM by SAP AG of Waldorf, Germany, database applications such as MySQL by MySQL AB of Uppsala, Sweden and similar applications. These applications access stored data, draw a table and insert the data into the table.
Tables are organizations of data as entries or records. Each entry or record includes a set of fields that are common amongst the entries. The entries can be displayed in rows and columns where each row corresponds to an entry and each column to a field of the entry. Often values in the fields of different entries are identical. Organizing entries with identical values in a given field can help the user establish relationships between the entries and identify information about the data set as a whole. The relationships between the entries can constitute a hierarchy of information within the table.
Some applications provide a grouping functionality to assist the user in manipulating the ordering of data to reveal a hierarchy that can be an explicit hierarchy or pseudo-hierarchy. The grouping function is performed by the application which draws the tables. As a result of grouping of any of the columns in the table, a hierarchy may be altered or lost. A table that includes grouped columns that are ordered left to right from fewest groupings to most groupings loses this order when a user ungroups a highly grouped column. As a result the hierarchy displayed by the ordering of the table columns is lost.